// 关于用户的接口
import axios from "@/utils/http.js";

// 用户注册的接口
export const userRegisterAPI = (data) => {
    return axios({
        url: "/register",
        method: "post",
        data
    });
};

// 用户登录接口
export const userLoginAPI = (data) => {
    return axios({
        url: "/login",
        method: "post",
        data,
        headers: {
            "Content-Type": "application/x-www-form-urlencoded",
        },
    });
};

// 加载当前用户的默认收货地址
export const getReceiveAddressAPI = (params) => {
    return axios({
        url: "/getReceiveAddress",
        method: "get",
        params,
    });
};